<script type="text/javascript">
<{include file='warehouse/shelf/js/index.js'}>
</script>
<link rel="stylesheet" type="text/css" href="/css/warehouse/shelf/index.css"/>

<div id="dialog" title="<{$lang.add}><{$lang.ws_code}>" style="display:none;">
    <div class="info">
        <div class="validateTips" id="tips"></div>
        <form id="createForm" name="createForm">
            <div class="item">
                <span class="userInfoLeft"><{$lang.warehouse}>:</span>
					<span class="userInfoRight">
						<select name="warehouse_id" id="warehouse_id" class="text ui-widget-content">
                            <option value=""><{$lang.pls}></option>
                            <{section name="loop" loop=$warehouse }>
                            <option value="<{$warehouse[loop].warehouse_id}>"><{$warehouse[loop].warehouse_name}></option>
                            <{/section}>
                        </select>
                        <span class="thisname"></span>
                    </span>
                <div style="clear: both;"></div>
            </div>
            <div class="item">
                <span class="userInfoLeft"><{$lang.warehouse}><{$lang.zone}>:</span>
					<span class="userInfoRight">
                    	<select name="wa_code" id="wa_code" class="text ui-widget-content">
                            <option value=""><{$lang.pls}></option>
                            <{section name="loop" loop=$warehouse_area }>
                            <option value="<{$warehouse_area[loop].wa_code}>"><{$warehouse_area[loop].wa_name}></option>
                            <{/section}>
                        </select>
                        <span class="thisname"></span>
                    </span>
                <div style="clear: both;"></div>
            </div>
            <div class="item">
                <span class="userInfoLeft"><{$lang.ws_code}>:</span>
					<span class="userInfoRight">
                        <input type="text" name="ws_code" id="ws_code" class="text ui-widget-content"/>
                        <span class="thisname"></span>
                    </span>

                <div style="clear: both;"></div>
            </div>
            <div class="item">
                <span class="userInfoLeft"><{$lang.ws_code}><{$lang.type}>:</span>
					<span class="userInfoRight">
                    	<select name="wsc_code" id="wsc_code" class="text ui-widget-content">
                            <option value=""><{$lang.pls}></option>
                            <{section name="loop" loop=$ShelfClass }>
                                <option value="<{$ShelfClass[loop].wsc_code}>"><{$ShelfClass[loop].wsc_code}></option>
                            <{/section}>
                        </select>
                    </span>
                <div style="clear: both;"></div>
            </div>
            <div class="item">
                <span class="userInfoLeft"><{$lang.priority}>:</span>
					<span class="userInfoRight">
                        <input type="text" name="ws_sort" value="0" class="text ui-widget-content"/>0-1000
                        <span class="thisname"></span>
                    </span>
                <div style="clear: both;"></div>
            </div>
            <div class="item">
                <span class="userInfoLeft"><{$lang.description}>:</span>
					<span class="userInfoRight">
						<input type="text" name="ws_note" id="ws_note" class="text ui-widget-content"/>
					</span>
            </div>
            <div style="clear: both;"></div>
            <div class="item">
                <span class="userInfoLeft"><{$lang.status}>:</span>
					<span class="userInfoRight">
						<select name="ws_statu" id="ws_statu" class="text ui-widget-content">
                            <option value="1"><{$lang.useable}></option>
                            <option value="0"><{$lang.unuseable}></option>
                        </select>
						<input type="hidden" name="ws_id" id="ws_id"/>
					</span>

                <div style="clear: both;"></div>
            </div>

        </form>
    </div>
</div>

<div id="batch_shelf_form" title="<{$lang.batch}><{$lang.create}><{$lang.ws_code}>" style="display: none;">
    <div style="margin:10px auto;">
        <div class="validateTips" id="batchtips"></div>
        <form id="batchForm" name="batchForm">
            <div>
                <span class="userInfoLeft"><{$lang.warehouse}>:</span>
				<span class="userInfoRight">
				<select id="warehouse" name="warehouse" style="margin:4px 0 10px 8px"
                        class="text ui-widget-content">
                    <option value=""><{$lang.pls}></option>
                    <{section name="loop" loop=$warehouse }>
                    <option value="<{$warehouse[loop].warehouse_id}>"><{$warehouse[loop].warehouse_name}></option>
                    <{/section}>
                        </select>
				</span>
            </div>
            <div>
                <span class="userInfoLeft"><{$lang.warehouse}><{$lang.zone}>:</span>
				<span class="userInfoRight">
                	<select name="room_wa_code" id="room_wa_code" style="margin:4px 0 10px 8px"
                            class="text ui-widget-content">
                        <option value=""><{$lang.pls}></option>
                        <{section name="loop" loop=$warehouse_area }>
                        <option value="<{$warehouse_area[loop].wa_code}>"><{$warehouse_area[loop].wa_name}></option>
                        <{/section}>
                    </select>  
				</span>
            </div>
            <div>
                <span class="userInfoLeft"><{$lang.ws_code}><{$lang.type}>:</span>
					<span class="userInfoRight">
                    	<select name="room_wsc_code" id="room_wsc_code" style="margin:4px 0 10px 8px" class="text ui-widget-content">
                            <option value=""><{$lang.pls}></option>
                            <{section name="loop" loop=$ShelfClass }>
                                <option value="<{$ShelfClass[loop].wsc_code}>"><{$ShelfClass[loop].wsc_code}></option>
                            <{/section}>
                        </select>
                    </span>
             </div>
            <div>
                <span class="userInfoLeft"><{$lang.ws_code}><{$lang.prefix}>:</span>
				<span class="userInfoRight" style="width: 66%;">
					<input type="text" name="prefix" id="prefix" class="text ui-widget-content"/>
					&nbsp;<span class="gray_color"><{$lang.for_example}>:888,<{$lang.make}><{$lang.ws_code}>888A1A2</span>
				</span>
            </div>
            <div>
                <span class="userInfoLeft"><{$lang.ws_code}><{$lang.start_code}>:</span>
				<span class="userInfoRight">
					<input type="text" name="begin_label" id="begin_label" class="text ui-widget-content"/>
					&nbsp;<span class="gray_color"><{$lang.for_example}>:A1</span>
				</span>
            </div>
            <div>

                <span class="userInfoLeft"><{$lang.ws_code}><{$lang.end_code}>:</span>
				<span class="userInfoRight">
					<input type="text" name="end_label" id="end_label" class="text ui-widget-content"/>
					&nbsp;<span class="gray_color"><{$lang.for_example}>:A6</span>
				</span>
            </div>
            <div>
                <span class="userInfoLeft"><{$lang.ws_code}><{$lang.start_row}>:</span>

				<span class="userInfoRight">
					<input type="text" name="begin_column" id="begin_column" class="text ui-widget-content"/>
					&nbsp;<span class="gray_color"><{$lang.for_example}>:A</span>
				</span>
            </div>
            <div>
                <span class="userInfoLeft"><{$lang.ws_code}><{$lang.end_row}>:</span>
				<span class="userInfoRight">
					<input type="text" name="end_column" id="end_column" class="text ui-widget-content"/>
					&nbsp;<span class="gray_color"><{$lang.for_example}>:C</span>
				</span>
            </div>
            <div>
                <span class="userInfoLeft"><{$lang.ws_code}><{$lang.start_line}>:</span>
				<span class="userInfoRight">
					<input type="text" name="begin_row" id="begin_row" class="text ui-widget-content"/>
					&nbsp;<span class="gray_color"><{$lang.for_example}>:1</span>
				</span>
            </div>
            <div>
                <span class="userInfoLeft"><{$lang.ws_code}><{$lang.end_line}>:</span>
				<span class="userInfoRight">
					<input type="text" name="end_row" id="end_row" class="text ui-widget-content"/>
					&nbsp;<span class="gray_color"><{$lang.for_example}>:3</span>
				</span>
            </div>
            <div class="item">
                <span class="userInfoLeft"><{$lang.priority}>:</span>
					<span class="userInfoRight">
                        <input type="text" name="batch_ws_sort" value="0" class="text ui-widget-content"/>0-1000
                        <span class="thisname"></span>
                    </span>
                <div style="clear: both;"></div>
            </div>
            <div class="item">
                <span class="userInfoLeft"><{$lang.description}>:</span>
					<span class="userInfoRight">
                        <input type="text" name="batch_ws_note" class="text ui-widget-content"/>
                        <span class="thisname"></span>
                    </span>
                <div style="clear: both;"></div>
            </div>
        </form>
    </div>
</div>

<div id="dialog-tabs" title="<{$lang.ws_code}><{$lang.detail}>" style="display:none; padding:10px;">
    <div id="tabs">
        <div class="bill">
            <div class="bill-head">
                <div class="bill-head-tip"><{$lang.ws_code}><{$lang.msg}></div>
                <input type="hidden" name="selected_ws_id" id="selected_ws_id"/>
                <input type="hidden" name="selected_ws_code" id="selected_ws_code"/>
            </div>
            <div class="bill-item">
                <div class="bill-item-left"><{$lang.ws_code}>：</div>
                <div ref="ws_code" class="bill-item-right"></div>
            </div>
            <div class="bill-item">
                <div class="bill-item-left"><{$lang.warehouse}><{$lang.zone}>：</div>

                <div ref="wa_code" class="bill-item-right"></div>
            </div>
            <div class="bill-item">
                <div class="bill-item-left"><{$lang.warehouse}><{$lang.name}>：</div>
                <div ref="warehouse_name" class="bill-item-right"></div>
            </div>
            <div class="myClear"></div>

            <div class="bill-item">
                <div class="bill-item-left"><{$lang.create}><{$lang.date}>：</div>
                <div ref="ws_create_date" class="bill-item-right"></div>
            </div>
            <div class="bill-item">
                <div class="bill-item-left"><{$lang.update}><{$lang.date}>：</div>
                <div ref="ws_last_update" class="bill-item-right"></div>
            </div>
            <div class="bill-item">
                <div class="bill-item-left"><{$lang.status}>：</div>
                <div ref=ws_statu class="bill-item-right"></div>
            </div>
            <div class="myClear"></div>
            <div class="bill-item" style="width: 100%;">
                <div class="bill-item-left" style="width: 12%;line-height:100%;"><{$lang.description}>：</div>
                <div ref="ws_note" class="bill-item-right" style="line-height: 100%; width: 80%;"></div>
            </div>
            <div class="myClear"></div>
        </div>
        <div id="tabs-head">
            <ul>
                <li id="tabs-li-1" class="tabs-head-active"><a href="javascript:switchTab(1);"><{$lang.base}><{$lang.msg}><{$lang.edit}></a></li>
                <li id="tabs-li-2"><a href="javascript:switchTab(2);"><{$lang.inventory}><{$lang.edit}></a></li>
            </ul>
        </div>

        <div id="tabs-1">
            <div class="bill">
                <div class="bill-table">
                    <div class="bill-table-head">
                        <div class="slcolumn1">ID</div>
                        <div class="slcolumn2"><{$lang.user}></div>
                        <div class="slcolumn3"><{$lang.time}></div>
                        <div class="slcolumn4"><{$lang.description}></div>
                    </div>
                    <div class="myClear"></div>
                    <div id="shelfLogData"></div>
                    <div id="paginationlog" class="pagination"></div>

                </div>
                <div class="myClear"></div>
            </div>
        </div>


    </div>
</div>

<div id="right_confirm" style="display: none;">
    <p style="text-align:center;font-size: 14px;color: red;font-weight: bold;">
        <{$lang.delete_sure}>？
    </p>
</div>

<div class="search_div">
    <div id="iTitle-div">
        <form id="sForm" name="sForm">
            <div class="divinput">
                <{$lang.customer_code}>：<input type="text" name="s_customer_id" onfocus="this.value=''" onkeyup="if(event.keyCode==13){submitsearch();}" id="s_customer_id" class="myInput"/>
                <{$lang.ws_code}>：<input type="text" name="s_ws_code" onfocus="this.value=''" onkeyup="if(event.keyCode==13){submitsearch();}" id="s_ws_code" class="myInput"/>
                <{$lang.customer_code}>-<{$lang.sku}>：<input type="text" name="s_product_id" onfocus="this.value=''" onkeyup="if(event.keyCode==13){submitsearch();}" id="s_product_id" class="myInput"/>
                &nbsp;&nbsp;<input type="button" onclick="submitsearch()" value="<{$lang.search}>" class="button"/>
                <input type="button" id="create" value="<{$lang.add}>" class="button"/>
                <input type="button" id="batchShelf" onclick="batchshelf()" value="<{$lang.batch}><{$lang.add}>" class="button"/>
            </div>
            <div class="divinput">
                <{$lang.warehouse}>：<select name="s_warehouse_id" id="s_warehouse_id" onchange="submitsearch()"
                           class="text ui-widget-content">
                <option value=""><{$lang.pls}></option>
                <{section name="loop" loop=$warehouse }>
                <option value="<{$warehouse[loop].warehouse_id}>"><{$warehouse[loop].warehouse_name}></option>
                <{/section}>
            </select>
                <{$lang.directory}>：<select name="s_product_option_choose" id="s_product_option_choose" onchange="submitsearch()"
                           class="text ui-widget-content">
                <option value=""><{$lang.pls}></option>
                <{section name="loop" loop=$OptionChoose}>
                <option value="<{$OptionChoose[loop].poc_id}>"><{$OptionChoose[loop].poc_value}></option>
                <{/section}>
            </select>
                <{$lang.zone}>：<select name="s_wa_code" id="s_wa_code" onchange="submitsearch()"
                           class="text ui-widget-content">
                <option value=""><{$lang.pls}></option>
                <{section name="loop" loop=$warehouse_area }>
                <option value="<{$warehouse_area[loop].wa_code}>"><{$warehouse_area[loop].wa_name}></option>
                <{/section}>
            </select>
                <{$lang.null}><{$lang.ws_code}>：<select name="s_isEmpty" id="s_isEmpty" onchange="submitsearch()" class="text ui-widget-content">
                <option value=""><{$lang.pls}></option>
                <option value="0"><{$lang.yes}></option>
                <option value="1" selected="selected"><{$lang.no}></option>
            </select>
            </div>
        </form>
        <div style='padding:10px 0;'>
                <input type="button" id="" onclick="batchPrint('A4x5')" value="<{$lang.batch}><{$lang.print}><{$lang.ws_code}>A4x5" class="button"/>
                <input type="button" id="batchShelf" onclick="batchPrint('A4')" value="<{$lang.batch}><{$lang.print}><{$lang.ws_code}>A4" class="button"/>
                <input type="button" id="batchShelf" onclick="batchPrint('10x10')" value="<{$lang.batch}><{$lang.print}><{$lang.ws_code}>10x10" class="button"/>
                <input type="button" id="" onclick="PrintProduct('3x2')" value="<{$lang.batch}><{$lang.print}><{$lang.product}><{$lang.label}>3x2" class="button"/>
                <input type="button" id="" onclick="PrintProduct('5x2')" value="<{$lang.batch}><{$lang.print}><{$lang.product}><{$lang.label}>5x2" class="button"/>
        </div>
    </div>
</div>
<form method="post" action="/warehouse/shelf/print" target="_blank" id="formPrint">
<input type="hidden" name='type' id='printType' value='A4'>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="myTab">
    <tbody>
    <tr class="even-tr">
   		<th><input type="checkbox" class="checkAll"></th>
        <th><{$lang.No}></th>
        <th class='sort' sortColumn="wa_code" sortMethod ='desc'><{$lang.area}></th>
        <th class='sort' sortColumn="ws_code" sortMethod ='desc'><{$lang.ws_code}></th>
        <th><{$lang.customer_code}>-<{$lang.sku}></th>
        <th><{$lang.inventory}></th>
        <th><{$lang.hold}><{$lang.inventory}></th>
        <th><{$lang.ws_code}><{$lang.apply_percentage}></th>
        <th><{$lang.inventory}><{$lang.status}></th>
        <th><{$lang.inventory}><{$lang.last}><{$lang.update}></th>
        <th><{$lang.status}></th>
        <th><{$lang.operation}></th>
    </tr>
    </tbody>
    <tbody id="loadListData"></tbody>
</table>
</form>
<div class="pagination"></div>
<!--<{$lang.batch}><{$lang.create}><{$lang.ws_code}><{$lang.view}>-->
<div id="setshelf_dialog" style="display:none;">
    <div class="item">
        <span class="userInfoLeft" style="width:110px;"><{$lang.total}><{$lang.create}> <b style="font-weight: bold;" id="div_total"></b> :</span>
          <span class="userInfoRight">
              <div class="div_ws_code">
                  <ul id="div_ws_code"></ul>
              </div>
          </span>
        <div style="clear: both;"></div>
    </div>
</div>
<div id="printDialog" style="display:none" title="Print"> </div>
